package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * Created by lyh on 2017-04-06.
 */
//@Entity
//@Table(name = "job_order", schema = "", catalog = "jbmcore")
//@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class JobOrderEntity extends ICtrl implements Serializable {
    private static final long serialVersionUID = 2109434978095476443L;
    private int jorderId;
    private String jorderCode;
    private int orderId;
    private int team;
    private String type;
    private String status;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private Timestamp lastUpdate;
    private Integer updateId;
    private String jobSum;
    private Timestamp guaranteeDate;
    private String memo;
    private Integer iscurrent;
    private List<JordAttachmentEntity> jordAttachmentList;
    private SellerEntity seller;
     private IorderEntity iorderEntity;

    public   JobOrderEntity(){}
    public   JobOrderEntity(boolean back,String errorinfo){
        this.back=back;
        this.errorinfo=errorinfo;
    }
    //@Id
    //@Column(name = "jorder_id")
    //@GeneratedValue
    public int getJorderId() {
        return jorderId;
    }

    public void setJorderId(int jorderId) {
        this.jorderId = jorderId;
    }

    //@Basic
    //@Column(name = "jorder_code")
    public String getJorderCode() {
        return jorderCode;
    }

    public void setJorderCode(String jorderCode) {
        this.jorderCode = jorderCode;
    }

    //@Basic
    //@Column(name = "order_id")
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    //@Basic
    //@Column(name = "team")
    public int getTeam() {
        return team;
    }

    public void setTeam(int team) {
        this.team = team;
    }

    //@Basic
    //@Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    //@Basic
    //@Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    //@Basic
    //@Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    //@Basic
    //@Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    //@Basic
    //@Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    //@Basic
    //@Column(name = "close_date")
    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }

    //@Basic
    //@Column(name = "close_id")
    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }

    //@Basic
    //@Column(name = "last_update")
    public Timestamp getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Timestamp lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    //@Basic
    //@Column(name = "update_id")
    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    //@Basic
    //@Column(name = "job_sum")
    public String getJobSum() {
        return jobSum;
    }

    public void setJobSum(String jobSum) {
        this.jobSum = jobSum;
    }

    //@Basic
    //@Column(name = "guarantee_date")
    public Timestamp getGuaranteeDate() {
        return guaranteeDate;
    }

    public void setGuaranteeDate(Timestamp guaranteeDate) {
        this.guaranteeDate = guaranteeDate;
    }

    //@Basic
    //@Column(name = "memo")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    //@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JobOrderEntity that = (JobOrderEntity) o;

        if (createId != that.createId) return false;
        if (jorderId != that.jorderId) return false;
        if (orderId != that.orderId) return false;
        if (team != that.team) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (guaranteeDate != null ? !guaranteeDate.equals(that.guaranteeDate) : that.guaranteeDate != null)
            return false;
        if (jobSum != null ? !jobSum.equals(that.jobSum) : that.jobSum != null) return false;
        if (jorderCode != null ? !jorderCode.equals(that.jorderCode) : that.jorderCode != null) return false;
        if (lastUpdate != null ? !lastUpdate.equals(that.lastUpdate) : that.lastUpdate != null) return false;
        if (memo != null ? !memo.equals(that.memo) : that.memo != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (updateId != null ? !updateId.equals(that.updateId) : that.updateId != null) return false;

        return true;
    }

    //@Override
    public int hashCode() {
        int result = jorderId;
        result = 31 * result + (jorderCode != null ? jorderCode.hashCode() : 0);
        result = 31 * result + orderId;
        result = 31 * result + team;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        result = 31 * result + (lastUpdate != null ? lastUpdate.hashCode() : 0);
        result = 31 * result + (updateId != null ? updateId.hashCode() : 0);
        result = 31 * result + (jobSum != null ? jobSum.hashCode() : 0);
        result = 31 * result + (guaranteeDate != null ? guaranteeDate.hashCode() : 0);
        result = 31 * result + (memo != null ? memo.hashCode() : 0);
        return result;
    }

    //@Basic
    //@Column(name = "iscurrent")
    public Integer getIscurrent() {
        return iscurrent;
    }

    public void setIscurrent(Integer iscurrent) {
        this.iscurrent = iscurrent;
    }
    //@Transient
    public List<JordAttachmentEntity> getJordAttachmentList() {
        return jordAttachmentList;
    }

    public void setJordAttachmentList(List<JordAttachmentEntity> jordAttachmentList) {
        this.jordAttachmentList = jordAttachmentList;
    }
     //@Transient
    public SellerEntity getSeller() {
        return seller;
    }

    public void setSeller(SellerEntity seller) {
        this.seller = seller;
    }
    //@Transient
    public IorderEntity getIorderEntity() {
        return iorderEntity;
    }

    public void setIorderEntity(IorderEntity iorderEntity) {
        this.iorderEntity = iorderEntity;
    }
}
